 /**
 * @file tal_zcl_ota.h
 * @brief Common process - zigbee zcl ota
 * @version 1.0.0
 * @date 2021-11-12
 *
 * @copyright Copyright 2018-2021 Tuya Inc. All Rights Reserved.
 *
 */
#ifndef __TAL_ZCL_OTA_H__
#define __TAL_ZCL_OTA_H__


#ifdef __cplusplus
    extern "C" {
#endif

#include "tuya_cloud_types.h"
#include "tuya_zigbee_stack.h"

// #define ZG_OTA_DOWNLOAD_AND_VERIFY_SUCCESS 0 ///< OTA successful
// #define ZG_OTA_DOWNLOAD_TIME_OUT           1 ///< OTA timeout
// #define ZG_OTA_VERIFY_FAILED               2 ///< OTA image validation failed
// #define ZG_OTA_SERVER_ABORTED              3 ///< An OTA server side exception
// #define ZG_OTA_CLIENT_ABORTED              4 ///< An OTA client side exception
// #define ZG_OTA_ERASE_FAILED                5 ///< Erase flash exceptions

/**
 * @brief zigbee ota start callback
 * @note < this is a weak function you can rewrite this API in app layer >
 * 
 * @param[in]   image_size: ota image size
 * @param[in]   argv:       not used
 * @return  none
 */
VOID_T tal_zg_ota_start_callback(UINT_T image_size, VOID_T* argv);

/**
 * @brief zigbee ota end callback
 * @note < this is a weak function you can rewrite this API in app layer >
 * 
 * @param[in]   result: ota result
 * @return  none
 */
VOID_T tal_zg_ota_end_callback(UINT8_T result);


#ifdef __cplusplus
}
#endif

#endif

